<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>Use and Implementation of Interfaces</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade><blockquote>
<center>
<h3><a name = "tag_000_006">&nbsp;</a>Use and Implementation of Interfaces</h3>
</center>
<xref type="2" name="interface"></xref>
Each of the following statements applies unless explicitly stated
otherwise in the detailed descriptions that follow.  If an argument to a
function has an invalid value (such as a value outside the domain of the
function, or a pointer outside the address space of the program, or a
null pointer), the behaviour is undefined.  Any function declared in a
header may also be implemented as a macro defined in the header, so a library
function should not be declared explicitly if its header is included.
Any macro definition of a function can be suppressed locally by
enclosing
the name of the function in parentheses, because the name is then not
followed by the left parenthesis that indicates expansion of a macro
function name.  For the same syntactic reason, it is permitted to take
the address of a library function even if it is also defined as a macro.
The use of the C-language
<b>#undef</b>
construct to remove any such macro definition
will also ensure that an actual function
is referred to.  Any invocation of a library function that is implemented
as a macro will expand to code that evaluates each of its arguments
exactly once, fully protected by parentheses where necessary, so it is
generally safe to use arbitrary expressions as arguments.  Likewise,
those function-like macros described in the following sections may be
invoked in an expression anywhere a function with a compatible return
type could be called.
<p>
Provided that a library function can be declared without reference to any
type defined in a header, it is also permissible to declare the
function, either explicitly or implicitly, and use it without
including its associated header.
If a function that accepts a variable number of
arguments is not declared (explicitly or by including its associated
header), the behaviour is undefined.
<p>
As a result of changes in this issue of this specification, application
writers are only required to include the minimum number of headers.
Implementations of XSI-conformant systems will make all necessary
symbols visible as described in the Headers section of this specification.
<h4><a name = "tag_000_006_001">&nbsp;</a>Use of File System Interfaces</h4>
The Interfaces in this volume that operate on files can behave
differently if the file that is being operated on has been made
available by a network file system.
If the network file system is an XSI-conformant system conforming
to the <b>XNFS</b> specification, the differences that can occur are detailed in
Appendices A and B of that document.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
